package tg.app.rj.workflow.workticket;

import java.rmi.RemoteException;
import java.util.Date;
import psdi.mbo.MboRemote;
import psdi.server.MXServer;
import psdi.util.MXException;
import tg.app.rj.workticket.CustWorkTicketRemote;

/***
 * 
 * @author pzx
 * 
 */
public class WtCustomAction {

	//
	private String wtnum;
	//
	private String wttype;
	//
	private String status;
	//
	private String user;
	//
	private String personid;
	//
	private Date date;
	//
	CustWorkTicketRemote wtmboremote;
	
	private String appname;
	
	public WtCustomAction(MboRemote mboRemote) throws RemoteException,
			MXException {
		if (mboRemote instanceof CustWorkTicketRemote) {
			wtmboremote = (CustWorkTicketRemote) mboRemote;
			wtnum = wtmboremote.getString("wtnum");
			wttype = wtmboremote.getString("wttype");
			status = wtmboremote.getString("status");
			if(wtmboremote.getUserInfo()!=null){
				user = wtmboremote.getUserInfo().getDisplayName();
				personid=wtmboremote.getUserInfo().getPersonId();
			}
			date = MXServer.getMXServer().getDate();
			if(mboRemote.getThisMboSet()!=null){
				appname=mboRemote.getThisMboSet().getApp();
			}
		}else{
			wtmboremote=(CustWorkTicketRemote) mboRemote;
		}

	}

	public String getWtnum() {
		return wtnum;
	}

	public void setWtnum(String wtnum) {
		this.wtnum = wtnum;
	}

	public String getWttype() {
		return wttype;
	}

	public void setWttype(String wttype) {
		this.wttype = wttype;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	
	public CustWorkTicketRemote getWtmboremote() {
		return wtmboremote;
	}

	public void setWtmboremote(CustWorkTicketRemote wtmboremote) {
		this.wtmboremote = wtmboremote;
	}
	public String getPersonid() {
		return personid;
	}

	public void setPersonid(String personid) {
		this.personid = personid;
	}
	public String getAppname() {
		return appname;
	}

	public void setAppname(String appname) {
		this.appname = appname;
	}

}